home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 13
/
AMIGAplus Sonderheft 13 (1998)(ICP)(DE)[!].iso
/
rexx
/
public.m2i
< prev
next >
Wrap
Text File
|
1997-11-18
|
983b
|
35 lines
/*
Public (ScreenName, M2IDrawer)
Open a drawer in a public screen,
or close it.
*/
PARSE ARG Screen Drawer
Drawer=STRIP(Drawer,B)
OPTIONS RESULTS
ADDRESS "M2IPort.Rexx"
GETPUBLIC Screen /* Public Screen exists? */
IF RC=0 THEN DO
PUBLICDRW Drawer /* Already opened on this screen? Then close it. */
IF RESULT~=Screen THEN DO
GET WINDOW Drawer /* Opened? */
IF RESULT=1 THEN CLOSEDRW Drawer /* Then close */
OPENDRWPUB Screen Drawer /* Open in a public screen */
IF RC=0 THEN SETDEFPUB Screen /* The screen is the default public screen */
IF RC=0 THEN PUBTOFRONT Screen /* Screen to front */
END
ELSE DO
GET WINDOW Drawer /* Opened? */
IF RESULT=1 THEN CLOSEDRW Drawer /* Then close */
OPENDRW Drawer /* Open in Workbench */
IF RC=0 THEN SETDEFPUB "Workbench"
IF RC=0 THEN PUBTOFRONT "Workbench"
END
END
EXIT